/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.genew.squadra.xml.model.builder;

/**
 *
 * @author Mario
 */

import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

public class ContainerBuilder implements Builder{
    public static void buildContainer(String fullpath, XMLStreamWriter xmlContainer) throws XMLStreamException {
        xmlContainer.writeStartDocument("UTF-8","1.0");
        
        xmlContainer.writeStartElement("container");
        xmlContainer.writeAttribute("xmlns", "urn:oasis:names:tc:opendocument:xmlns:container");
        xmlContainer.writeAttribute("version", "1.0");
        
        xmlContainer.writeStartElement("rootfiles");
        xmlContainer.writeStartElement("rootfile");
        xmlContainer.writeAttribute("full-path", fullpath);
        xmlContainer.writeAttribute("media-type", "application/oebps-package+xml");
        xmlContainer.writeEndElement();
        
        xmlContainer.writeEndElement();
        xmlContainer.writeEndElement();
        xmlContainer.writeEndDocument();
    }
    
        

        
        
        
        
        
    }
    
    

